home *** CD-ROM | disk | FTP | other *** search
/ Holt Researcher: American History / Holt Researcher: American History.iso / pc / modules / grphwiz.dxr / 00045_cancel button.ls < prev    next >
Encoding:
Text File  |  2000-01-14  |  1.2 KB  |  48 lines

  1. property ancestor, pMIAW
  2. global gEnvironObj, gGraph, gIsAlertMessagesOn, gDataNotSavedAlert, gIsRolloverTextOn
  3.  
  4. on new me, buttonName, castName, theChannel, theStageLoc, theBalloonChannel, theBalloonLoc, descendant
  5.   if objectp(descendant) then
  6.     ancestor = new(script("button with balloon"), buttonName, castName, theChannel, theStageLoc, theBalloonChannel, theBalloonLoc, descendant)
  7.   else
  8.     ancestor = new(script("button with balloon"), buttonName, castName, theChannel, theStageLoc, theBalloonChannel, theBalloonLoc, me)
  9.   end if
  10.   cursor = [member("point hand", "graph.cst"), member("point hand mask", "graph.cst")]
  11.   set the cursor of sprite the pChannel of me to cursor
  12.   return me
  13. end
  14.  
  15. on setMIAW me, miaw
  16.   pMIAW = miaw
  17.   return me
  18. end
  19.  
  20. on performFunction me
  21.   if getaProp(gGraph, #pIsDirty) then
  22.     if gIsAlertMessagesOn then
  23.       tell the stage
  24.         openAlertWindow("datntsav", rect(0, 0, 320, 211))
  25.       end tell
  26.     else
  27.       closeMe(pMIAW)
  28.     end if
  29.   else
  30.     closeMe(pMIAW)
  31.   end if
  32.   return me
  33. end
  34.  
  35. on performRolloverFunction me
  36.   if gIsRolloverTextOn then
  37.     performRolloverFunction(ancestor)
  38.   end if
  39.   return me
  40. end
  41.  
  42. on performRolloffFunction me
  43.   if gIsRolloverTextOn then
  44.     performRolloffFunction(ancestor)
  45.   end if
  46.   return me
  47. end
  48.